<!DOCTYPE>
<html>
<head>
<#include "../constant.ftl">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>蜡笔同步 - 全部短信</title>

<link rel="stylesheet" type="text/css" href="/css/reset.css" />
<link rel="stylesheet" type="text/css" href="/css/common.css"/>

<script src="/js/util/jquery.min.js?v=1.3.1.10" type="text/javascript"></script>
<script type="text/javascript">

</script>

<link rel="stylesheet" type="text/css" href="/css/sms.css" />
<link rel="stylesheet" type="text/css" href="/css/sms_dialog.css"/>



<script type="text/javascript"> 
function toPage(pageIndex){
	$("#currentPage").val(pageIndex);
	$("#form1").submit();
}
$(document).ready(function(){
	$(".chk-select-all").click(function(){
		var _self = $(this);
		$("[name='msgchk']").each(function(){
			if(_self.attr("checked")){
				$(this).attr("checked",true);
			}else{
				$(this).attr("checked",false);
			}
		});
	});
		
	$(".btn-4").click(function(){
		$("#form1").attr("action","/sms/delete");
		$("#form1").submit();
		/**var ids = "";
		var idArray = new Array();
		$("[name='msgchk']").each(function(){
			if($(this).attr("checked")){
				ids += "id=" + $(this).val() + "&";
				idArray.push($(this).val());
			}
		});
		
		$.ajax({
			url:"/sms/delete",
			data:ids,
			type:"POST",
			success:function(msg){
				for(id in idArray){
					$("#msgtag_" + idArray[id]).remove();
				}
			}
		});*/
		
	});
});
</script>
</head>

<body>
    <div id="content">
    <form id="form1" action="/sms/list">
        <div class="main" id="main-container">          
            <div id="sms-container" class="common-container">
				<div class="sms-send-dialog">
    				<div class="sms-send-dialog-titlebar" id="H-sms-dialog-nav-container">
        				<a class="sms-send-dialog-title active" id="tab_sms_send" href="javascript:;">发短信</a>
				        <a class="tab-sms-offtips link-default" id="tab_sms_offtips" target="_blank"  href="http://faq.labi.com/index.php?sid=111138&lang=zh&action=artikel&cat=14&id=48&artlang=zh">为什么会掉线？</a>
					    <div class="sms-send-dialog-counter" id="H-dialog-counter">
            				<span>0</span>字 分<span>0</span>条发送
        				</div>  
    				</div>
			    <div id="H-sms-dialog-container">
        			<div id="H-send-dialog-container">
            			<div id="H-send-dialog-maximize" style="display:none;"></div>                       
            				<div id="H-send-dialog-minimize">                               
                
            				</div>
        				</div>
					    <div id="H-push-dialog-container">
            				<div id="H-push-dialog-maximize" style="display:none;"></div>                       
            				<div id="H-push-dialog-minimize">                               
                
            			</div>
        			</div>
    			</div>                      
			</div>
            <div id="l_lh">
            	<div class="lla" id="typName"><#if type==SMS_TYPE_ALL>全部<#elseif type==SMS_TYPE_RECEIVE>收到<#elseif type==SMS_TYPE_SEND>发出</#if>短信(${vo.count})</div>
            	
            	<input type="hidden" id="currentPage" value="${vo.currentPage}"  name="currentPage" />
            		<div class="l_lha"  id="simpleAdvanced">
                    	<div class="sms-seimg icon_sms-search" onclick="toPage(1)" id="simple_search_btn"></div>
                        <input id="simple-input" class="sms-se" func="se" name="queryString" tips="您可以通过姓名、电话号码、短信内容进行搜索" value="" />                     
                    </div>
                
                </div>
				<div id="forSmsSe">
    				<div id="op_top">
        				<div class="sms-page">
        					<div class="page">
							<a title="首页" class="page-first-enable" href="javascript:toPage(1)"></a>
							<#if vo.currentPage gt 1><a title="上页" class="page-prev-enable" href="javascript:toPage(${vo.currentPage-1})"></a></#if>
							<#if vo.currentPage lt vo.totalPage><a title="下页" class="page-next-enable" href="javascript:toPage(${vo.currentPage+1})"></a></#if>
							<a title="末页" class="page-last-enable" href="javascript:toPage(${vo.totalPage})"></a>
							<select>
							<#assign t = vo.totalPage>
							<#list 1..t as x>
								<option value="1">${x}/${vo.totalPage}</option>
							</#list>
							</select>
						</div>
        				</div>
        				<div class="l_ljm">
            				<input type="checkbox" class="chk-select-all" />
            				<span>全选</span>
        				</div>
        				<a class="btn btn-4" style="float:left;" href="javascript:void(0);"><span>删除</span></a>
        				<div class="sms-select">
            				<span class="at">@</span>
        				</div>
    				</div>
				    <ul id="l_lk">
				    <#list vo.smss as sms>
                    	<li class="llkli" name="read" id="msgtag_${sms.id}" ">
                            <div class="llg">
                            	<div class="llga">
                                    <input type="checkbox" name="msgchk" value="${sms.id}" />
                                </div>
                                <div class="icon_inbox-already-read iconDiv"></div>
                            </div>
                            <div class="llh">
                            	<a class="link-default llhd" href="javascript:void(0);" >${sms.name}</a>
                                <span class="llf" id="cont_34275571">${sms.body}</span>
                            </div>
                            <div class="llj" id="llj_34275571">
                                <div class="lljb">
                                    ${sms.formatDate?string("yyyy-MM-dd HH:mm")}
                                    <span class="sms-owner" data-imei="865061000939286">@</span><span class="icon-sms-url sms-owner-icon" data-imei="865061000939286"></span>
                                </div>
                            </div>
                            <div class="llp llp_copy" id="llp_34275571"></div>

                        </li>
			             </#list>
    				</ul>
    				<div id="op_bottom">
        				<div class="sms-page"></div>
        				<div class="l_ljm">
            				<input type="checkbox" class="chk-select-all" />
            				<span>全选</span>
        				</div>
        				<a class="btn btn-4" style="float:left;" href="javascript:void(0);" onclick="NS_sms.removeSms();"><span>删除</span></a>
        				<div class="sms-select">
            			<span class="at">@</span>
        			</div>
    			</div>
			</div>                  
        </div>  
        </form>        
    </div>
        
   	<div class="sub">
		<div class="nav-container">
    		<div class="nav">
		        <div class="nav-border-top icon-nav-border-radius"></div>
		        <div class="nav-border-radius-topleft icon-nav-border-radius"></div>
		        <div class="nav-border-radius-topright icon-nav-border-radius"></div>
		        <div class="nav-border-radius-bottomleft icon-nav-border-radius"></div>
		        <div class="nav-border-radius-bottomright icon-nav-border-radius"></div>
        		<div class="nav-item">
            		<b class="icon-nav-sms icon16 nav-sms-"></b>
            		<a id="nav_sms_" href="/sms/list">全部短信</a>
        		</div>
        		<div class="nav-item">
            		<b class="icon-nav-sms icon16 nav-sms-1"></b>
            		<a id="nav_sms_1" href="/sms/list?type=1">收件箱</a>
        		</div>
        		<div class="nav-item nav-item-last">
            		<b class="icon-nav-sms icon16 nav-sms-2"></b>
            		<a id="nav_sms_2" href="/sms/list?type=2">已发短信</a>
        		</div>
    		</div>
		    <div class="nav">
		        <div class="nav-border-top icon-nav-border-radius"></div>
		        <div class="nav-border-radius-topleft icon-nav-border-radius"></div>
		        <div class="nav-border-radius-topright icon-nav-border-radius"></div>
		        <div class="nav-border-radius-bottomleft icon-nav-border-radius"></div>
		        <div class="nav-border-radius-bottomright icon-nav-border-radius"></div>
		        <div class="nav-item">
		            <b class="icon-nav-crc icon16 nav-crc-"></b>
		            <a id="nav_crc_" href="/log/list">全部通话</a>
		        </div>
		        <div class="nav-item">
		            <b class="icon-nav-crc icon16 nav-crc-1"></b>
		            <a id="nav_crc_1" href="/log/log?type=1">已接来电</a>
		        </div>
		        <div class="nav-item">
		            <b class="icon-nav-crc icon16 nav-crc-2"></b>
		            <a id="nav_crc_2" href="/log/log?type=2">已拨电话</a>
		        </div>
		        <div class="nav-item">
		            <b class="icon-nav-crc icon16 nav-crc-3"></b>
		            <a id="nav_crc_3" href="/log/log?type=3">未接来电</a>
		        </div>
		    </div>
		</div>
		<div class="festival-sms-logo">
    		<embed src="swf/flowerOther.swf?v=0.172152363288686" quality="high" type="application/x-shockwave-flash" width="100%" height="100%" swliveconnect="true" allowscriptaccess="always" wmode="transparent"></embed>
		</div>
    </div>
</div>
</body>
</html>
